package cn.wsalix.biz.entity;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.entity.SimpleEntity;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "MEETING")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(callSuper = false)
public class Meeting extends SimpleEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1216810335904590704L;
	private String logo;
	private String httpUrl;
	
	private String subject;//主题
	private String sponsor;//主办单位
	private String coOrganizer;//协办单位
	private String reach;//参与活动人员范围
	private String meetingContent;
	private String contact;//联系人
	private String address;//地址
	@OneToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY, mappedBy = "meeting")
	private Set<Participate> participates;	
}
